// 通过BoolModel对数据库进行CURD操作
const mongoose = require('mongoose')

// 定义文档结构 生成Schema对象
const bookSchema = mongoose.Schema({
    name: String,
    author: String,
    price: Number
})
// 生成模型Model
const BookModel = mongoose.model('books', bookSchema)


// 暴露模型 BookModel
module.exports = BookModel

